package com.dw.core.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dw.core.entity.Admin;
import com.dw.core.mapper.IAdminMapper;
import com.dw.core.service.IAdminService;
import org.springframework.stereotype.Service;

/**
 * @author zhangjing
 * @date 2020/8/21 14:53
 * @Description
 */
@Service
public class AdminServiceImpl extends ServiceImpl<IAdminMapper, Admin> implements IAdminService {


    /**
     * find by adminName
     *
     * @param adminName
     * @return
     */
    @Override
    public Admin findByAdminName(String adminName) {
        return this.getOne(new LambdaQueryWrapper<Admin>().eq(Admin::getAdminName, adminName));
    }
}
